package com.sangeng.controller;


import com.sangeng.entity.ResponseResult;
import com.sangeng.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/system")
public class UserController {
    @Autowired
UserService userService;
//    @GetMapping("/list")
//    public ResponseResult getAllUserInfo(Integer pageNum,Integer pageSize){
//
//   return userService.getAllUserInfo(pageNum,pageSize);
//    }


    /**
     * @param pageNum
     * @param pageSize
     * @param userName
     * @param status
     * @param phonenumber
     * 根据条件获取用户·信息
     * @return
     */
    @GetMapping("/user/list")
    public ResponseResult getUserList(Integer pageNum,Integer pageSize,String userName,String status, String phonenumber){


        return userService.getUserList(pageNum,pageSize,userName,status,phonenumber);

    }



}
